﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Quartz;

namespace Crawler.Job
{
    public class ParserJobListener : IJobListener
    {
        public static bool IsRunning = false;
        #region IJobListener Members

        public void JobExecutionVetoed(JobExecutionContext context)
        {
            
        }

        public void JobToBeExecuted(JobExecutionContext context)
        {
            IsRunning = true;
        }

        public void JobWasExecuted(JobExecutionContext context, JobExecutionException jobException)
        {
            IsRunning = false;
        }

        public string Name
        {
            get { return "ParserJobListener"; }
        }

        #endregion
    }
}
